﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

/**
 * @file TriggerInvoker
 * 
 * @author LeonXie
 * */
namespace Catsland.Core
{
    /**
     * @brief invoker of trigger
     * 
     * the corresponding functions will be invoked when trigger is activated
     * for simple trigger, InTrigger will be invoked when trigger is activated
     * for complex trigger, EnterTrigger will be invoked when object enters,
     * InTrigger will be invoked when object activates the trigger in the next frame
     * ExitTrigger will be invoked when object leave trigger
     * */
	public interface TriggerInvoker
	{
        /**
         * @brief invoked when object enter the complex trigger
         * 
         * @param trigger the trigger
         * @param invoker the activator
         * */
		void EnterTrigger(Collider trigger, Collider invoker);
        /**
         * @brief invoked when object constant activates complex trigger, or 
         *  activates simple trigger
         * 
         * @param trigger the trigger
         * @param invoker the activator
         * */
        void InTrigger(Collider trigger, Collider invoker);
        /**
         * @brief invoked when object exit the complex trigger
         * 
         * @param trigger the trigger
         * @param invoker the activator
         * */
        void ExitTrigger(Collider trigger, Collider invoker);
	}
}
